package com.jn.rxjava.service;

import io.reactivex.rxjava3.core.Observable;
import io.reactivex.rxjava3.core.Single;
import retrofit2.http.GET;
import retrofit2.http.Query;

public interface ApiService {
    @GET("api/bing")
    Observable<ResponseData> getItems();

    @GET("toutiao/index")
    Single<NewsResponse> getNews(
            @Query("key") String key,
            @Query("type") String type,
            @Query("page") int page,
            @Query("page_size") int pageSize,
            @Query("is_filter") int isFilter
    );

    @GET("simpleWeather/query")
    Single<WeatherResponse> getWeather(
            @Query("key") String key,
            @Query("city") String city
    );

    @GET("simpleWeather/life")
    Single<LifeResponse> getLifeIndex(
            @Query("key") String key,
            @Query("city") String city
    );
}
